package br.rafael.mulock.controle_de_estoque.controle;

import javax.persistence.EntityManager;
import javax.persistence.Query;

import br.rafael.mulock.controle_de_estoque.dao.ConexaoDAO;

public class TesteAction {

	public static void main(String[] args) throws Exception {
		ConexaoDAO.abrirConexao("postgres", "HardHost5");

		EntityManager em = ConexaoDAO.getEntityManager();
		Query query = em.createQuery("select e from Cliente e where e.cpf = :cpf");
		query.setParameter("cpf", "00000000000");
		Object resultado = query.getSingleResult();
		em.close();

		System.out.println(resultado);
	
	}
}
